package com.medicine.hbp.picker;//package com.medicine.hbp.picker;
//
//import java.util.Calendar;
//
//import android.app.Activity;
//import android.os.Bundle;
//
//
//public class MainActivity extends Activity {
//	private DatePicker dpicker;
//	private TimePicker Tpicker;
//    private Calendar calendar;
//	   private String selectDate,selectTime;
//	    //ѡ��ʱ���뵱ǰʱ�䣬�����ж��û�ѡ����Ƿ�����ǰ��ʱ��
//	    private int currentHour,currentMinute,currentDay,selectHour,selectMinute,selectDay;
//    @Override
//    protected void onCreate(Bundle savedInstanceState) {
//        super.onCreate(savedInstanceState);
//        setContentView(R.layout.activity_main);
//        calendar = Calendar.getInstance();
//        selectDate = calendar.get(Calendar.YEAR) + "��" + calendar.get(Calendar.MONTH) + "��" 
//                + calendar.get(Calendar.DAY_OF_MONTH) + "��" 
//                + DatePicker.getDayOfWeekCN(calendar.get(Calendar.DAY_OF_WEEK));
//        //ѡ��ʱ���뵱ǰʱ��ĳ�ʼ���������ж��û�ѡ����Ƿ�����ǰ��ʱ�䣬����ǣ�����toss��ʾ����ѡ���ȥ��ʱ��
//        selectDay = currentDay = calendar.get(Calendar.DAY_OF_MONTH);
//        selectMinute = currentMinute = calendar.get(Calendar.MINUTE);
//        selectHour = currentHour = calendar.get(Calendar.HOUR_OF_DAY);
//        
//        selectTime = currentHour + "��" + ((currentMinute < 10)?("0"+currentMinute):currentMinute) + "��";
//        dpicker = (DatePicker)findViewById(R.id.datePicker1);
//        Tpicker = (TimePicker)findViewById(R.id.timePicker1);
//        dpicker.setOnChangeListener(dp_onchanghelistener);
//        Tpicker.setOnChangeListener(tp_onchanghelistener);
//    }
//    //listeners
//    DatePicker.OnChangeListener dp_onchanghelistener = new DatePicker.OnChangeListener() {
//        @Override
//        public void onChange(int year, int month, int day, int day_of_week) {
//            selectDay = day;
//            selectDate = year + "��" + month + "��" + day + "��" + DatePicker.getDayOfWeekCN(day_of_week);
//        }
//    };
//    TimePicker.OnChangeListener tp_onchanghelistener = new TimePicker.OnChangeListener() {
//        @Override
//        public void onChange(int hour, int minute) {
//            selectTime = hour + "��" + ((minute < 10)?("0"+minute):minute) + "��";
//            selectHour = hour;
//            selectMinute = minute;
//        }
//    };
//}
